﻿using BCCommon.Enums;
using BCCommon.PaymentEnums;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace BCDto.Common.Payment.Payment
{
    /// <summary>
    /// 支付请求
    /// </summary>
    public class PaymentRequestDto
    {
        /// <summary>
        /// 应用类型。
        /// </summary>
        [Display(Name = "应用类型")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public SourceAppType AppType { get; set; }
        /// <summary>
        /// 订单类型。
        /// </summary>
        [Display(Name = "订单类型")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public FlowType OrderType { get; set; }

        /// <summary>
        /// 唯一参考号。
        /// </summary>
        [Display(Name = "唯一参考号")]
        //[Required(ErrorMessage = "{0} 不能为空")]
        public string ReferenceNumber { get; set; }

        /// <summary>
        /// 支付金额。
        /// </summary>
        [Display(Name = "支付金额")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public decimal Amount { get; set; }

        /// <summary>
        /// 支付渠道类型。
        /// </summary>
        [Display(Name = "支付渠道类型")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public PaymentChannelType ChannelType { get; set; }

        /// <summary>
        /// 操作系统。
        /// </summary>
        [Display(Name = "操作系统")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public SourceOSType OSType { get; set; }

        /// <summary>
        /// 设备类型。
        /// </summary>
        [Display(Name = "设备类型")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public SourceDeviceType DeviceType { get; set; }

        /// <summary>
        /// 设备编号。
        /// </summary>
        [Display(Name = "设备编号")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string DeviceId { get; set; }

        /// <summary>
        /// 参数。
        /// </summary>
        [Display(Name = "参数")]
        public Dictionary<string, string> Parameters { get; set; } = new Dictionary<string, string>();

        /// <summary>
        /// 付款方
        /// </summary>
        [Display(Name = "付款方")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [Obsolete("我认为这个字段不应放这里。")]
        public SourcePayerType Payer { get; set; }
        
    }
}
